import request from '@utils/request'

// 七牛token
const getQiniuToken = async (data) => {
  return request({
    url: '/common/getQiniuToken',
    method: 'get',
    data
  })
}

// 验证码
const getCode = async (data) => {
  return request({
    url: '/common/getCode',
    method: 'get',
    data
  })
}

// 获取vip
const getVip = async (data) => {
  return request({
    url: '/test/getVip',
    method: 'get',
    data
  })
}

const getUrl = async (data) => {
  return axios.get(`https://www.yunnanyunyin.com/qiniu/uploadForm?resUrl=${data}`)
}

export { getCode, getQiniuToken, getVip, getUrl }
